#ifndef CLIENTWIDGET_H
#define CLIENTWIDGET_H

#include <QWidget>
#include<QTcpSocket>  //通信套接字

namespace Ui {
class ClientWidget;
}

class ClientWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ClientWidget(QWidget *parent = nullptr);
    ~ClientWidget();

private slots:
    void on_connectButton_clicked();

    void on_sendButton_clicked();

    void on_closeButton_clicked();

    void on_pushButton_clicked();

    void on_pushButton_pressed();

private:
    Ui::ClientWidget *ui;
    bool status;     //用来判断是否进入了服务器
    size_t strSize;
    int port;
    QHostAddress *serverIP;
    QString userName;
    QTcpSocket *tcpsocket;

};

#endif // CLIENTWIDGET_H
